package com.tangyuan.user.controller;

import com.tangyuan.common.result.Result;
import com.tangyuan.user.service.UserPublishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/otherinfo")
public class UserOtherInfoController {



    @Autowired
    UserPublishService userPublishService;



    @RequestMapping("/getOtherUserVideoInfo")
    public Result getOtherUserVideoInfo(
            @RequestHeader(name = "userId", required = false) Long myUserId,
            @RequestParam Long userId,
            @RequestParam Integer pageNum,
            @RequestParam Integer pageSize) {
        return userPublishService.getMyVideo(myUserId,userId, pageNum, pageSize);
    }
    @RequestMapping("/getOtherUserArticleInfo")
    public Result getOtherUserArticleInfo(@RequestParam Long userId,
                                        @RequestParam Integer pageNum,
                                        @RequestParam Integer pageSize){
        return userPublishService.getOtherUserArticleInfo(userId,pageNum,pageSize);
    }




}
